<html>
<head><meta charset="utf-8"><title>missing method completions · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html">missing method completions</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227419570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227419570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227419570">(Feb 23 2021 at 12:04)</a>:</h4>
<p>Hey, I think we are missing some inherent methonds in completion (but they resolve fine). Has anyone else noticed this? Seems like a regression</p>



<a name="227419640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227419640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227419640">(Feb 23 2021 at 12:05)</a>:</h4>
<p>there's that weird bug where private methods don't show up after a macro call in the same function</p>



<a name="227419727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227419727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227419727">(Feb 23 2021 at 12:06)</a>:</h4>
<p>yup, thats is</p>



<a name="227419740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227419740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227419740">(Feb 23 2021 at 12:06)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/7728">rust-analyzer#7728</a></p>



<a name="227419758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227419758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227419758">(Feb 23 2021 at 12:06)</a>:</h4>
<p>I wonder if the local item resolution changes might have something to do with it</p>



<a name="227419787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227419787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227419787">(Feb 23 2021 at 12:07)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="211727">@Jonas Schievink  [he/him]</span></p>



<a name="227419789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227419789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227419789">(Feb 23 2021 at 12:07)</a>:</h4>
<p>yeah probably</p>



<a name="227419927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227419927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227419927">(Feb 23 2021 at 12:08)</a>:</h4>
<blockquote>
<p>putting the code into the crate root makes it work.</p>
</blockquote>
<p>aaargh not again</p>



<a name="227420095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227420095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227420095">(Feb 23 2021 at 12:09)</a>:</h4>
<p>oh, I see now</p>



<a name="227420122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227420122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227420122">(Feb 23 2021 at 12:09)</a>:</h4>
<p>that's cursed</p>



<a name="227420231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227420231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227420231">(Feb 23 2021 at 12:10)</a>:</h4>
<p>I mean, I see how we may mix up current crate in expander, I don't know wheter the bug is exactly</p>



<a name="227420256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227420256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kirill Bulatov <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227420256">(Feb 23 2021 at 12:10)</a>:</h4>
<p>Not sure if related, but even fields are not sometimes completed in the test functions for me.<br>
Although it's non-deterministic and I've not managed to extract an mre out of that.</p>



<a name="227420272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227420272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227420272">(Feb 23 2021 at 12:10)</a>:</h4>
<p>this bug also affects fields</p>



<a name="227428555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227428555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227428555">(Feb 23 2021 at 13:23)</a>:</h4>
<p>ah, the problem is probably just <code>Visibility::is_visible_from_def_map</code> not handling block def maps</p>



<a name="227464682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227464682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227464682">(Feb 23 2021 at 16:57)</a>:</h4>
<p>that was pretty painful, but fixed in <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7768">https://github.com/rust-analyzer/rust-analyzer/pull/7768</a></p>



<a name="227466533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/missing%20method%20completions/near/227466533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/missing.20method.20completions.html#227466533">(Feb 23 2021 at 17:08)</a>:</h4>
<p>hmm why did it depend on the position in the function though?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>